.TH std::pointer_traits::to_address 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::pointer_traits::to_address \- std::pointer_traits::to_address

.SH Synopsis
   Defined in header <memory>
   static element_type* to_address( pointer p )     \fI(since C++20)\fP
   noexcept;                                        (optional member of program-defined
                                                    specialization)

   Constructs a raw pointer that references the same object as its pointer-like ("fancy
   pointer") argument.

   This function, if defined, is the inverse of pointer_to, and exists as the
   customization point to be called by std::to_address.

.SH Parameters

   p - fancy pointer/pointer-like object

.SH Return value

   A raw pointer of the type element_type* that references the same memory location as
   the argument p.

.SH See also

   pointer_to obtains a dereferenceable pointer to its argument
   \fB[static]\fP   \fI(public static member function)\fP
   to_address obtains a raw pointer from a pointer-like type
   (C++20)    \fI(function template)\fP
